﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StaffContractorStaffEnquiry.aspx.cs" Inherits="MTRC.ODMS.Web.SOM.CodeSetup.StaffContractorStaffEnquiry" %>

<%@ Register Assembly="APJ.Web.UI.WebControls" Namespace="APJ.Web.UI.WebControls"
    TagPrefix="APJ" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" %>
<%@ Register Src="~/UserControl/Menu/PageFoot.ascx" TagName="PageFoot" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/TabStrip.ascx" TagName="TabStrip" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/PageHead.ascx" TagName="PageHead" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/MainMenu.ascx" TagName="MainMenu" TagPrefix="WebStructure" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Operational Data Management System</title>
    <link href="<%=ResolveUrl("~/CSS/common.css")%>" rel="stylesheet" type="text/css" />
    <script  type="text/jscript" language="JavaScript" src="../../Javascript/CommonFunction.js"></script> 
<style type="text/css">
    .HandCursorClass
    {
        cursor: pointer;
    }
</style>

<script language="javascript" type="text/javascript">
//    function ShowDetails(clientID)
//    {
//        window.showModalDialog("../Popup/ShowDetails.aspx?PageID=COM&ID="+clientID.id,window,"dialogHeight:250px;dialogWidth:300px,center:yes,resizable:no,scroll:no,status:no");
//        return false;
//    }


function PageOnload()
{
    
}

function OpenEntryPageMaximum(url)  //huangyao 20081129 in MTR office
{
    //debugger;
    var aaa = url;
    //xopen(url, window.screen.width, window.screen.height,'yes',null);
    //xopen(url, 1024, 768,'yes',null);
    //alert("test by huangyao");
    //  window.moveTo(0,0);   
    //  window.resizeTo(screen.availWidth,screen.availHeight);   
    //  window.outerWidth=screen.availWidth;   
    //  window.outerHeight=screen.availHeight;   

      newwin=window.open("","","scrollbars=yes, toolbar=yes, menubar=yes, location=yes, status=yes, resizable=yes");
      if   (document.all)
      {   
        newwin.moveTo(0,0);   
        newwin.resizeTo(screen.width,screen.height - 25);
      }   
      newwin.location=url;   
}
</script>
</head>
<body onload="PageOnload();">
    <form id="form1" runat="server">  
        <AjaxControlToolkit:ToolkitScriptManager ID="ToolkitScriptManager" runat="server">
        </AjaxControlToolkit:ToolkitScriptManager>      
            <table border="0" cellpadding="0" cellspacing="0" class="Page_Container">
                <tr>
                   <td colspan="2" class="Page_Head">
                        <WebStructure:PageHead ID="PageHead" runat="server" />
                    </td>
                </tr>               
                <tr>
                    <td class="Page_Left">
                        <WebStructure:MainMenu ID="MainMenu" runat="server" AppPath="../../" CurrMenuID="M140921" />
                    </td>
                    <td class="Page_Right" style="width: 100%">
                       <table class="Page_Contents">
                          <tr>
                            <td class="TabStrip" style="width: 1142px"><WebStructure:TabStrip ID="TabStrip" CurrMenuID="M140824" ParentMenuID="M140921" DMenuMode="CurrOnly" runat="server" /></td>
                          </tr>
                           
                          <tr>
                            <td class="Contents" style="width: 1142px">
                            <div id="searchcondition" style=" width:98.5%; float:left;border-width:1px; border-color:#aaaaaa; border-style:solid;background-color: #eeeeee; padding-left: 10px;">
                            <table border="0px" width="100%">
                                <tr>
                                    <td>
                                        <asp:Label ID="lblStationLable" runat="server"></asp:Label>
                                        &nbsp;                 
                                        <asp:DropDownList ID="ddlStation" runat="server" CssClass="ddlStation">
                                        </asp:DropDownList>
                                        &nbsp;
                                        <asp:Label ID="lblName" runat="server">Name:</asp:Label>
                                        &nbsp;
                                        <asp:TextBox ID="txtName" runat="server" Width="100px" MaxLength="50" Enabled="true"></asp:TextBox>
                                        &nbsp;
                                        <asp:Label ID="lblShowObsolete" runat="server">Show Obsolete:</asp:Label>
                                        &nbsp;
                                        <asp:CheckBox ID="cblShowObsolete" runat="server" />
                                        &nbsp;
                                    </td>
                                   <td align="right">
                                        <asp:Button ID="btnSearch" runat="server" Text="" OnClick="btnSearch_Click"  />&nbsp;&nbsp;
                                        <asp:Button ID="btnAddNew" runat="server" Text="" OnClick="btnAddNew_Click"/>&nbsp;
                                    </td>
                                  </tr>
                            </table> 
                            </div>
                              <div id="datagrid" style=" width:100% ;padding-left: 1px;padding-top:5px;">
                                  <APJ:CommonGridView ID="grdSearchResult" runat="server" AllowPaging="True" AllowSorting="True" AscPic="~/Images/Common/arrow_up_green.png" AutoGenerateColumns="False" BorderColor="black" CssClass="GridView" DescPic="~/Images/Common/arrow_down_green.png" BackColor="White" BorderWidth="1px" OnRowDataBound="grdSearchResult_RowDataBound" OnRowCommand="grdSearchResult_RowCommand" DataKeyNames="ContractorName1" PageLinkCount="7">
                                      <PagerTemplate>
                                          <asp:Table ID="CommonPagerTemplate" runat="server" Width="100%">
                                              <asp:TableRow ID="COMGRIDV_TR" runat="server">
                                                  <asp:TableCell ID="COMGRIDV_Pager_Cell_TotalRecords" runat="server" CssClass="GridView_Pager_Cell_TotalRecords">
                                                      <asp:Label ID="Lbl_T_TotalRecords" runat="server">Total Records:</asp:Label>
                                                      <asp:Label ID="Lbl_V_TotalRecords" runat="server"></asp:Label>
                                                      &nbsp; &nbsp;
                                                      <asp:Label ID="Lbl_V_CurPage" runat="server"></asp:Label>
                                                      &nbsp;<asp:Label runat="server">/</asp:Label>
                                                      &nbsp;<asp:Label ID="Lbl_V_TotalPages" runat="server"></asp:Label>
                                                  </asp:TableCell>
                                                  <asp:TableCell ID="COMGRIDV_Pager_Cell_PageSize" runat="server" CssClass="GridView_Pager_Cell_PageSize">
                                                      <asp:Label ID="Lbl_T_PageSize" runat="server">PageSize:</asp:Label>
                                                      &nbsp;&nbsp;<asp:DropDownList ID="DDL_PageSize" runat="server" AutoPostBack="True">
                                                          <asp:ListItem Value="5">5</asp:ListItem>
                                                          <asp:ListItem Value="10">10</asp:ListItem>
                                                          <asp:ListItem Value="15">15</asp:ListItem>
                                                          <asp:ListItem Value="20">20</asp:ListItem>
                                                          <asp:ListItem Value="25">25</asp:ListItem>
                                                          <asp:ListItem Value="30">30</asp:ListItem>
                                                      </asp:DropDownList>
                                                  </asp:TableCell>
                                                  <asp:TableCell ID="COMGRIDV_Pager_Cell_Prev" runat="server" CssClass="GridView_Pager_Cell_Prev">
                                                      <asp:LinkButton ID="LBtn_Previous" runat="server" CommandArgument="Prev" CommandName="Page"><</asp:LinkButton>
                                                  </asp:TableCell>
                                                  <asp:TableCell ID="COMGRIDV_Pager_Cell_PagerLink" runat="server" CssClass="GridView_Pager_Cell_PagerLink">
                                                      <asp:Panel ID="Pnl_PageLink" runat="server" CssClass="GridView_Pager_PageLinkPanel">
                                                      </asp:Panel>
                                                  </asp:TableCell>
                                                  <asp:TableCell ID="COMGRIDV_Pager_Cell_Next" runat="server" CssClass="GridView_Pager_Cell_Next">
                                                      <asp:LinkButton ID="LBtn_Next" runat="server" CommandArgument="Next" CommandName="Page">></asp:LinkButton>
                                                  </asp:TableCell>
                                              </asp:TableRow>
                                          </asp:Table>
                                      </PagerTemplate>
                                      <RowStyle CssClass="GridView_Row" />
                                      <HeaderStyle CssClass="GridView_Header" BackColor="#D1F2FF" Font-Bold="True" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Strikeout="False" Font-Underline="False" ForeColor="#022D72" />
                                      <AlternatingRowStyle CssClass="GridView_AlternativeRow" BackColor="Silver" />
                                      <Columns>
                                          <asp:BoundField DataField="CompanyName1" HeaderText="SOM_ContractorCompany" SortExpression="CompanyName1"><%-- add by jack 20150916 for u217 "change CompanyName to CompanyName1" --%>
                                              <itemstyle width="250px" />
                                          </asp:BoundField>
                                          <asp:BoundField DataField="ContractorName1" HeaderText="SOM_ContractorName" SortExpression="ContractorName1">
                                          </asp:BoundField>
                                          <asp:TemplateField HeaderText="SOM_Void" SortExpression="FlagObsolete">
                                            <itemtemplate>
                                            <asp:CheckBox id="chkFlagObsolete" runat="server" Checked='<%# DataBinder.Eval(Container.DataItem,"FlagObsolete") %>' Enabled="False"></asp:CheckBox>
                                            </itemtemplate>
                                        </asp:TemplateField>
                                          <asp:TemplateField  HeaderText="COM_Edit">
                                           <itemstyle width="50px" />
                                            <itemtemplate>
                                            <asp:ImageButton id="Btn_edit" ToolTip=<%# this.GetLabel("COM_Edit") %> runat="server" CssClass="link" CommandName="Edit" CommandArgument='<%# Eval("ContractorID") %>' ImageUrl="../../Images/SOM/Edit.gif"></asp:ImageButton>                                             
                                            </itemtemplate>
                                        </asp:TemplateField>
                                      </Columns>
                                      <FooterStyle BackColor="White" ForeColor="#000066" />                                      
                                      <EmptyDataRowStyle CssClass="GridView_Header" />
                                      <EmptyDataTemplate>
                                          <asp:Table runat="server" CssClass="GridView_Header_EmptyData">
                                              <asp:TableRow runat="server">
                                                  <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="105px"></asp:TableCell>
                                                  <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="105px"></asp:TableCell>
                                                  <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="60px"></asp:TableCell>
                                                  <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="60px"></asp:TableCell>
                                                  <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="130px"></asp:TableCell>
                                                  <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="150px"></asp:TableCell>
                                                  <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="20px"></asp:TableCell>
                                                  <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="20px"></asp:TableCell>
                                                  <asp:TableCell runat="server" Width="20px"></asp:TableCell>
                                              </asp:TableRow>
                                          </asp:Table>
                                      </EmptyDataTemplate>
                                  </APJ:CommonGridView>
                              </div>                             
                            </td>
                          </tr>
                          <tr>
                            <td class="Page_Foot" style="height: 33px; width: 1142px;"><WebStructure:PageFoot ID="PageFoot" runat="server" /></td>
                          </tr>
                       </table>                                              
                    </td>
                </tr>                
            </table>        
    </form>
</body>

</html>
